<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 插值表达式 -->
        {{ message }}
        <!-- 插值表达式不能在属性上使用 -->
        <!-- <img src="{{imgUrl}}"> -->
        <img v-bind:src="imgUrl"><br>
        <!-- 简写形式 -->
        <img :src="imgUrl">
    </div>

    <!-- 1. 引入vue.js文件 -->
    <script src="js/vue.js"></script>
    <script>
        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    message: "Hello Vue",
                    imgUrl: "img/1.jpg"
                }
            }
        });

        vm.imgUrl = "img/2.jpg";
    </script>
</body>
</html>